#pragma once

#include "TGListenThread.h"
#include "TGSvrNetCB.h"
#include "TGSvrNetCfg.h"

//#include "SvrNetLoginMan.h"
#include "SvrNetTransMan.h"
// #include "SvrNetTalkItem.h"
// 
// #include "SvrNetFileMan.h"



class TGSvrNetTransMan :public TGListenThread, public TGSvrNetCB, public TGSvrNetCfg
{
public:
	TGSvrNetTransMan(void);
	~TGSvrNetTransMan(void);


public:
	int SvrStart();
	int SvrStop();

public:

// private:
// 	virtual int vTcpCmdDispatch(SOCKET hClientSocket,NET_PACKET_HEAD *pMsgHead,BYTE *pBuffer);
// 
// private:
// 	virtual int vUdpCmdDispatch(SOCKET hSocket,TG_UDP_ADDR *pAddr,NET_PACKET_HEAD *pMsgHead,BYTE *pBuffer);
// 	int UdpCmdCommand(SOCKET hSocket,TG_UDP_ADDR *pAddr,NET_PACKET_HEAD *pMsgHead,BYTE *pBuffer);


private:
	virtual int vTcpDataDispatch(SOCKET hClientSocket,NET_PACKET_HEAD *pMsgHead,BYTE *pBuffer);

private:
	virtual int vUdpDataDispatch(SOCKET hSocket,TG_UDP_ADDR *pAddr,NET_PACKET_HEAD *pMsgHead,BYTE *pBuffer);
	int UdpDataCommand(SOCKET hSocket,TG_UDP_ADDR *pAddr,NET_PACKET_HEAD *pMsgHead,BYTE *pBuffer);

public:
	SvrNetTransMan m_xTransMan;


public:
#ifdef dkq_test_svrnet
	TGLogInfo m_xLog;
#endif

};

//extern TGSvrNetMan g_TGSvrNetMan;